package com.huonan.component.kafka;


import com.mz.social.common.web.annotation.BaseResponse;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/kafka")
@BaseResponse
@AllArgsConstructor
public class KafkaController {

    KafkaProducer kafkaProducer;

    @GetMapping("hello")
    public String hello() {
        return "hello";
    }


    @GetMapping("/send")
    public void consumer() {
         kafkaProducer.sendMessage("");
    }

}


